package com.gk.panda.pojo.patrol.request;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @Author：xxz
 * @Create: 2022/11/8 17:16
 */
@Data
public class LocationRequest {
  @NotBlank(message = "经度不能为空")
  @ApiModelProperty(value = "经度",required = true)
  private String lon;

  @NotBlank(message = "纬度不能为空")
  @ApiModelProperty(value = "纬度",required = true)
  private String lat;

  @NotNull(message = "巡护id不能为空")
  @ApiModelProperty(value = "巡护id",required = true)
  private Long patrolId;

  /**
   * 是否是事件点位1是0不是
   */
  @ApiModelProperty(value = "是否是事件点位1是0不是,无需传该字段")
  private Integer isEvent;

  /**
   * 巡护事件id
   */
  @ApiModelProperty(value = "巡护事件id，无需传该字段")
  private Long reportId;

  /**
   * 采集时间
   */
  @ApiModelProperty(value = "获取位置时间，离线上报时必传")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  @NotNull(message = "采集时间不能为空")
  private Date createTime;
}
